package com.gitee.theskyzero.actuator;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author theskyzero
 * @date 2021/5/24
 */
@RestController
@RequestMapping("/act")
public class InvokeRestController {


    @Autowired
    MonitorRepository monitorRepository;

    @GetMapping
    public String invoke() {
        monitorRepository.increment();
        return "方法执行啦,当前次数" + monitorRepository.count();
    }
}
